// AttendanceRulesDialog.h
#include <QDialog>
#include <QStandardItemModel>
#include <QSqlTableModel>
#include <QLabel>
#include <QTableView>
#include <QPushButton>
class AttendanceRulesDialog : public QDialog {
    Q_OBJECT
public:
    explicit AttendanceRulesDialog(QWidget *parent = nullptr);

private slots:
    void addRule();
    void editRule();
    void deleteRule();
    void updatePagination();

private:
    void setupUI();
    void loadRules();

    QSqlTableModel *model;
    QTableView *tableView;
    QPushButton *addButton;
    QPushButton *delButton;
    QLabel *pageInfoLabel;
    int currentPage = 1;
    const int pageSize = 10;
};
